From 4364e980992548a332ac66ce5e63cffc3c837fe2 Mon Sep 17 00:00:00 2001 From: robertl Date: Sun, 7 May 2006 20:09:20 +0000 Subject: [PATCH] Bring in computed track structures. --- defs.h | 32 ++++++++++++++++++++++---------- 1 file changed, 22 insertions(+), 10 deletions(-) diff --git a/defs.h b/defs.h index 28d15d2cb..b8fe32c5f 100644 --- a/defs.h +++ b/defs.h @@ -94,6 +94,14 @@ #define BASE_STRUCT(memberp, struct_type, member_name) \ ((struct_type *)((char *)(memberp) - offsetof(struct_type, member_name))) +typedef enum { + fix_unknown=-1, + fix_none=0, + fix_2d=1, + fix_3d, + fix_dgps, + fix_pps +} fix_type; /* * Define globally on which kind of data gpsbabel is working. @@ -106,15 +114,6 @@ typedef enum { rtedata } gpsdata_type; -typedef enum { - fix_unknown=-1, - fix_none=0, - fix_2d=1, - fix_3d, - fix_dgps, - fix_pps -} fix_type; - #define NOTHINGMASK 0 #define WPTDATAMASK 1 #define TRKDATAMASK 2 @@ -350,6 +349,19 @@ typedef struct { unsigned short cet_converted; /* strings are converted to UTF8; interesting only for input */ } route_head; +/* + * Structure of recomputed track/roue data. + */ +typedef struct { + double distance_meters; + double max_alt; + double min_alt; + double max_spd; + double min_spd; + time_t start; /* Min time */ + time_t end; /* Max time */ +} computed_trkdata; + /* * Bounding box information. */ @@ -436,7 +448,7 @@ void track_backup(signed int *count, queue **head_bak); void track_restore( queue *head_bak); void track_append( queue *src ); void route_flush( queue *head ); -void track_recompute( const route_head *trk); +void track_recompute( const route_head *trk, computed_trkdata **); /* * All shortname functions take a shortname handle as the first arg. -- 2.30.2